package com.Maykk.Demo02;

/**
 * @ClassName: MyThread
 * @Description: TODO 自定义线程
 * @Author: MaykkStar@163.com
 */
public class MyThread extends Thread {
    public MyThread() {
        super();
    }

    public MyThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        for (int i = 1; i <= 20; i++) {
            System.out.printf("%-6s正在出招，现在是第 %d 招\n", this.getName(), i);
            try {
                Thread.sleep(1);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }

        }
    }
}
